package com.hk.housekeeping.service;/*
 * @author  pyh
 * @date  2021/1/30 0030 上午 11:31
 * @version 1.0
 * @since JDK1.8_241
 */

import com.hk.housekeeping.entity.Advertise;
import com.hk.housekeeping.utils.PageUtils;
import com.hk.housekeeping.utils.ResponseEntity;

import java.util.List;

public interface AdvertiseService {
    /**
     * 添加
     * @param advertise
     * @return
     */
    public ResponseEntity<Integer> insert(Advertise advertise);

    /**
     * 删除
     * @param id
     * @return
     */
    public ResponseEntity<Integer> del(int id);

    /**
     * 查询一条广告信息
     * @return
     */
    public Advertise list(int id);

    /**
     * 修改
     * @param advertise
     * @return
     */
    public ResponseEntity<Integer> update(Advertise advertise);

    /**
     * 通过广告名称查询
     * @param name
     * @return
     */
    public ResponseEntity<PageUtils<List<Advertise>>> selectByName(String name, int currentPage, int pageSize);

    /**
     * 通过状态值查询
     * @param status
     * @return
     */
    public ResponseEntity<PageUtils<List<Advertise>>> selectByStatus(int status, int currentPage, int pageSize);

    //通过广告名称和状态值共同查询
    public ResponseEntity<PageUtils<List<Advertise>>> selectByDouble(String name, int status, int currentPage, int pageSize);

    /**
     * 广告表分页查询
     * @param currentPage
     * @param pageSize
     * @return
     */
    ResponseEntity<PageUtils<List<Advertise>>> pageSelect(int currentPage, int pageSize);

    /**
     * 查询广告表的总条数
     * @return
     */
    ResponseEntity<Integer> getTotalCount();
}
